package com.la.bc_api.controller;


import com.la.bc_api.service.APITestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * @Author LA
 * @Date 2024/8/29 14:07
 * @Description:
 */
@RestController
public class APITestController {


    //冀玉博提交测试
    @Autowired
    private APITestService apiTestService;

    /**
     * 智能体请求
     * @param message
     * @return
     */
    @PostMapping("/creat")
    public String apiTest(String message){
        return apiTestService.creatGPT(message);
    }

    /**
     * 通用请求
     * @param message
     * @return
     */
    @GetMapping("/request")
    public String request(@RequestParam(value = "ques",defaultValue = "你是谁") String message){
        return apiTestService.request(message);
    }
}
